#include <iostream>
#include "MyTask.h"
#include "ThreadPool.h"

int main()
{
    auto pool = ThreadPool::getInstance();
    pool->start();//启动线程池
    for (int i = 0; i < 10; i++)
    {
        auto task = std::make_shared<MyTask>("taskid = "+std::to_string(i));
        pool->addTask(task);
        std::this_thread::sleep_for(std::chrono::milliseconds(500));
    }
    

    return 0;
}